Close Workbook
AutomatR.Excel.Activities.CloseWorkbook
The "Close Workbook" activity in AutomatR is part of the Excel activities package, allowing you to close an opened Excel workbook. This activity is useful for managing resources efficiently and ensuring proper cleanup after working with Excel data.
Properties
Name | Description |
---|---|
Misc | |
Display Name | The display name of the activity. A display name is automatically generated when you indicate a target. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Close Workbook" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
Workbook | Specifies the workbook variable representing the currently active workbook that needs to be closed. If no workbook is provided, it will close the currently active workbook. |
How to use:
- Drag and drop the "Close Workbook" activity onto the workflow.
- Optionally, configure the properties by specifying the workbook variable representing the workbook to be closed. If no workbook is provided, it will close the currently active workbook.
- Optionally, configure the delay.
- Execute the workflow to close the specified workbook or the currently active workbook.
Example: Consider an example where the "Close Workbook" activity is used to close the currently active workbook:
Close Workbook:
Delay: 2
In this example, the activity closes the currently active workbook with a 2-second delay, allowing time for any necessary cleanup or synchronization.